<?php
	$xtpl_main->assign ( "page_title", "Informationpass" );
	//--
	$resultInformation = mysql_query("SELECT * FROM member WHERE member_id = '".$_SESSION['member_id']."'");
		$rowListInformation = mysql_fetch_array($resultInformation);
		$xtpl->assign('userdetail', $rowListInformation); 
	if(isset($_POST['frmAct']) && $_POST['frmAct'] == 'doInformation'){
		$resultInformation_edit = mysql_query("SELECT member_password FROM member WHERE member_password = '".md5($_POST['information_password'])."'");
		if(mysql_num_rows($resultInformation_edit) >0){
			mysql_query ("	
						UPDATE member 
						SET 
							member_address = '".addslashes($_POST['information_address'])."', 
							member_mail = '".addslashes($_POST['information_mail'])."', 
							member_phone = '".addslashes($_POST['information_phone'])."' 
						WHERE 
							member_id = '".$_SESSION['member_id']."' 
					");
		
		header("Location: ?mod=member&act=information");
	}
		else {
			$xtpl->parse('center.False');
		}
	}
?>